//
//  RZConversation.h
//  RZIM
//
//  Created by reyzhang on 2021/8/2.
//  聊天会话 数据模型

#import <Foundation/Foundation.h>
#import "RZGroupInfo.h"
#import "RZMessageInfo.h"
#import "RZUserInfo.h"


NS_ASSUME_NONNULL_BEGIN

/**
 {
     group =     {
         gid = 582091447263776768;
         groupAvatar = 11;
         groupName = 11;
         groupType = 1;
         isTop = 0;
         notReadCnt = 0;
     };
     messageList =     (
                 {
             gid = 582091447263776768;
             id = 582091450032848896;
             mid = 582091448282992640;
             msg = "lisi\U9080\U8bf7zhangsan\U52a0\U5165\U7fa4\U7ec4";
             msgState = 0;
             msgTime = "2021-08-02 16:30:26";
             msgType = 0;
             offline = 1;
             subType = 4;
             tid = 123;
             uid = 456;
         }
     );
     userList =     (
                 {
             gid = 582091447263776768;
             isDisturb = 0;
             notename = "<null>";
             uid = 456;
             userAvatar = teste;
             userType = 0;
             username = lisi;
         },
                 {
             gid = 582091447263776768;
             isDisturb = 0;
             notename = "<null>";
             uid = 123;
             userAvatar = teste;
             userType = 1;
             username = zhangsan;
         }
     );
 }
 
 */
@interface RZConversation : NSObject

@property (nonatomic, strong) RZGroupInfo *groupInfo;
@property (nonatomic, strong) NSArray<RZUserInfo *> *userList;
@property (nonatomic, strong) NSMutableArray<RZMessageInfo *> *messageList;


@property (nonatomic, strong,readonly) NSString *targetId; //目标id
@property (nonatomic, strong,readonly) NSString *targetName; //目标名称
@property (nonatomic, strong,readonly) NSString *targetPortrait; //目标图像
@property (nonatomic, assign,readonly) RZConversationType conversationType;



+ (instancetype)createWithSocketMessage:(RZMessage *)message;

@end

NS_ASSUME_NONNULL_END
